<?php
$data = [
    [
        'id' => 1,
        'name' => 'name',
        'group' => 'basic',
        'title' => 'Site name',
        'tip' => '请填写站点名称',
        'type' => 'string',
        'value' => 'YLYF',
        'content' => '',
        'rule' => 'required',
        'extend' => '',
    ],
    [
        'id' => 2,
        'name' => 'beian',
        'group' => 'basic',
        'title' => 'Beian',
        'tip' => '',
        'type' => 'string',
        'value' => '',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 3,
        'name' => 'cdnurl',
        'group' => 'basic',
        'title' => 'Cdn url',
        'tip' => '如果静态资源使用第三方云储存请配置该值',
        'type' => 'string',
        'value' => '',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 5,
        'name' => 'timezone',
        'group' => 'basic',
        'title' => 'Timezone',
        'tip' => '',
        'type' => 'string',
        'value' => 'Asia/Shanghai',
        'content' => '',
        'rule' => 'required',
        'extend' => '',
    ],
    [
        'id' => 6,
        'name' => 'forbiddenip',
        'group' => 'basic',
        'title' => 'Forbidden ip',
        'tip' => '一行一条记录',
        'type' => 'text',
        'value' => '',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 8,
        'name' => 'fixedpage',
        'group' => 'basic',
        'title' => 'Fixed page',
        'tip' => '请尽量输入左侧菜单栏存在的链接',
        'type' => 'string',
        'value' => 'dashboard',
        'content' => '',
        'rule' => 'required',
        'extend' => '',
    ],
    [
        'id' => 9,
        'name' => 'categorytype',
        'group' => 'dictionary',
        'title' => 'Category type',
        'tip' => '',
        'type' => 'array',
        'value' => '{"default":"Default","page":"Page","article":"Article","test":"Test"}',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 10,
        'name' => 'configgroup',
        'group' => 'dictionary',
        'title' => 'Config group',
        'tip' => '',
        'type' => 'array',
        'value' => '{"basic":"Basic","Email":"email","example":"Example" }',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 24,
        'name' => 'version',
        'group' => 'basic',
        'title' => '版本号',
        'tip' => '',
        'type' => 'string',
        'value' => '1.0',
        'content' => '',
        'rule' => '',
        'extend' => '',
    ],
    [
        'id' => 25,
        'name' => 'request_number',
        'group' => 'basic',
        'title' => '访问次数',
        'tip' => '',
        'type' => '',
        'value' => '158',
        'content' => '访问次数',
        'rule' => '',
        'extend' => '',
    ],

];

foreach ($data as $v){
    $model = new \app\common\model\Config;
    $model->save($v);
}